-
-
Notifications
You must be signed in to change notification settings - Fork 264
Fix OSV to handle affected_packages correctly & add support to collect commits #2080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
91b89f3 to
ab084af
Compare
|
OSV Logs , importers:
|
ebaee7d to
b6bf165
Compare
| { | ||
| "reference_id": "", | ||
| "reference_type": "", | ||
| "url": "http://git.fedorahosted.org/cgit/freeipa.git/commit/?id=a1991aeac19c3fec1fdd0d184c6760c90c9f9fc9" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we classify them as commit type ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that this is passed as part of the reference URLs, so it’s not easy to detect whether it’s a commit URL or just an article. We have already classified some of these as reference_type=commit because they were passed as a Git range.
I think one option is to improve our capabilities to parse different commit URLs in the packageurl-python library and rely on improvers like pipelines/v2_improvers/collect_commits.py to handle this case.
|
pypa_importer_v2 pysec_v2.txt oss_fuzz_v2 has a duplicated advisory_id ex: github_osv_importer_v2: |
|
For logs, we need to make a clear decision about which logs and data we ignore, and which ones we need to fix/support. pysec_importer_v2: oss_fuzz_importer_v2 github_osv_importer_v2 |
Add support to collect commits Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Use parse_advisory_data_v3 for GitHub OSV. Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Update the function docs osv_v2 Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Fix CVSSv4 vector length issue Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
…es to keep ranges consistent. Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
fa1dfa2 to
45a43c0
Compare
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
keshav-space
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ziadhany, see some comments below.
Regarding pysec_importer_v2 log it is very vague. It gives no information about what the problem with the advisory. Is it that we can’t parse the version, package is missing, or something else? Log should be actionable.
vulnerabilities/tests/test_data/osv_test/github/github-expected-2.json
Outdated
Show resolved
Hide resolved
vulnerabilities/tests/test_data/osv_test/github/github-expected-3.json
Outdated
Show resolved
Hide resolved
|
@keshav-space The problem is that in OSV we have three types of version ranges:
We cannot merge these, because doing so would produce an invalid version constraint. This results in the following error: Logs from the old pipeline when I tried to merge them: |
|
Let’s take this osv range as an example here: This is the right set of affected package for the above range. [
{
"package": "pkg:composer/devcode-it/openstamanager",
"affected_version_range": "vers:composer/<=2.9.4",
"fixed_version_range": "vers:composer/2.9.5",
"introduced_by_commit_patches": [],
"fixed_by_commit_patches": []
}
]This is set of affected packages that we're getting currently, which is not accurate. [
{
"package": "pkg:composer/devcode-it/openstamanager",
"affected_version_range": "vers:composer/<2.9.5",
"fixed_version_range": "vers:composer/2.9.5",
"introduced_by_commit_patches": [],
"fixed_by_commit_patches": []
},
{
"package": "pkg:composer/devcode-it/openstamanager",
"affected_version_range": "vers:composer/<=2.9.4",
"fixed_version_range": null,
"introduced_by_commit_patches": [],
"fixed_by_commit_patches": []
}
] |
…en last_known_affected_version_range, and finally range-based versions Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Issue: